Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rdlc.hw
Class Library

    java.lang.Object
      rdlc.hw.Library

    public class Library

extends java.lang.Object

This class represents an abstract hardware library. It is responsible for loading the library configuration XML file, and then subsequently loading the appropriate classes, and files.

Version:
  $Revision: 1.29 $
Author:
  Greg Gibeling

Nested Class Summary
`protected class` | `Library.LibraryLoader` This class does the actual XML parsing and loading.

Field Summary
`protected Namespace` | `baseNamespace` The base package of the library.
`protected java.util.Hashtable<java.lang.String,java.lang.Class>` | `engineTable` Table of all the engines in this library.
`protected java.util.Hashtable<java.lang.String,java.lang.Class>` | `linkTable` Table of all the links in this library.
`protected Module` | `startDoneModule` The start done module.

Constructor Summary
`Library(java.lang.String _resourceName, Namespace _rootNamespace, Log errorLog)` Simple constructor, calls the `Library.LibraryLoader` class to actually parse the XML file and do the loading.

Method Summary
`Engine` | `createEngine(java.lang.String engineName, boolean accurateSim, Log errorLog)` Create an engine of the given type.
`Link` | `createLink(java.lang.String linkName, boolean accurateSim, Log errorLog)` Create a link of the given type.
`Namespace` | `getBaseNamespace()` Simple accessor.
`Module` | `getStartDoneModule()` Simple accessor.
`static int` | `parseBitwidth(java.lang.String value)` Static method to parse an btiwidth from a string.
`static int` | `parseInteger(java.lang.String value)` Static method to parse an integer from a string.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### baseNamespace

    protected Namespace baseNamespace

  The base package of the library.

### startDoneModule

    protected Module startDoneModule

  The start done module. There should only be one module which has the startdone attribute set to true.

### linkTable

    protected java.util.Hashtable<java.lang.String,java.lang.Class> linkTable

  Table of all the links in this library.

### engineTable

    protected java.util.Hashtable<java.lang.String,java.lang.Class> engineTable

  Table of all the engines in this library.

Constructor Detail

### Library

    public Library(java.lang.String _resourceName,
                   Namespace _rootNamespace,
                   Log errorLog)

  Simple constructor, calls the `Library.LibraryLoader` class to actually parse the XML file and do the loading.

  Parameters:
    `_resourceName` - The resource to load as the config file.
    `_rootNamespace` - The root namespace to merge into.
    `errorLog` - A list of errors to be reported to the user.

Method Detail

### getBaseNamespace

    public Namespace getBaseNamespace()

  Simple accessor.

  Returns:
    The base namespace of this library.

### getStartDoneModule

    public Module getStartDoneModule()

  Simple accessor.

  Returns:
    The start done module.

### createLink

    public Link createLink(java.lang.String linkName,
                           boolean accurateSim,
                           Log errorLog)

  Create a link of the given type. This will actually cause an instance of the link generator class to be constructed and returned, if possible. If there's an error, this method will return `null`.

  Parameters:
    `linkName` - The name of the link generator to instantiate.
    `accurateSim` - `true` indicates that this is a cycle accurate simulation.
  Returns:
    An instance of the link generator class.

### createEngine

    public Engine createEngine(java.lang.String engineName,
                               boolean accurateSim,
                               Log errorLog)

  Create an engine of the given type. This will actually cause an instance of the engine generator class to be constructed and returned, if possible. If there's an error, this method will return `null`.

  Parameters:
    `engineName` - The name of the engine generator to instantiate.
    `accurateSim` - `true` indicates that this is a cycle accurate simulation.
    `errorLog` - Log of errors to be reported to the user.
  Returns:
    An instance of the engine generator class.

### parseInteger

    public static int parseInteger(java.lang.String value)

  Static method to parse an integer from a string. This will accept numbers with C style 0x, 0d, 0b prefixes and also verilog style ?'h... prefixes. Notice that this will not return the bitwidth if the verilog style is used.

  Parameters:
    `value` - A string representing an integer.
  Returns:
    The value of the given number, translated from the appropriate base.
  See Also:
    `parseBitwidth(String)`

### parseBitwidth

    public static int parseBitwidth(java.lang.String value)

  Static method to parse an btiwidth from a string. This will accept numbers with verilog style ?'h... prefixes and return the given bitwidth. Otherwise it will compute the bitwidth needed to represent the given number. Notice that it will not return the value of the number, just the bitwidth.

  Parameters:
    `value` - A string representing an integer with or without a bitwidth.
  Returns:
    The bitwidth of the given integer, either read from the string or computed.
  See Also:
    `parseInteger(String)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD